<seed-content>
  <seed-toolbar-header>
    <seed-toolbar-title>办理报名</seed-toolbar-title>
    <seed-toolbar-menu></seed-toolbar-menu>
  </seed-toolbar-header>
  <div class="apply-registration-wrap">
    <form [formGroup]="pageForm">
      <div class="product-list">
        <div class="product-item seed-underline">
          <span>购课类别</span>
          <select formControlName="buyType">
            <option value="">请选择购课类型</option>
            <option *ngFor="let item of pageData.buyTypeList" [value]='item.id'>{{item.title}}</option>
          </select>
        </div>
        <div class="product-item seed-underline">
          <span>付款类型</span>
          <select formControlName="payType">
            <option value="">请选择付款类型</option>
            <option *ngFor="let item of pageData.payTypeList" [value]='item.id'>{{item.title}}</option>
          </select>
        </div>
        <div class="product-item">
          <span>实收（￥）</span>
          <input type="text" placeholder="请输入金额" formControlName="signupFee">
        </div>
      </div>
      <div class="product-list" *ngIf="pageForm.value.buyType">
        <div class="product-item seed-underline">
          <span>课程</span>
          <select formControlName="courseId">
            <option value="">请选择课程</option>
            <option *ngFor="let item of courseList" [value]='item.trainCourseSimpleVO.id'>
              {{item.trainCourseSimpleVO.courseName}}
            </option>
          </select>
        </div>
        <div class="product-item seed-underline">
          <span>校区</span>
          <select formControlName="schoolId">
            <option value="">请选择校区</option>
            <option *ngFor="let item of simpleVOList" [value]='item.id'>{{item.schoolName}}</option>
          </select>
        </div>
        <div class="product-item seed-underline">
          <span>班别</span>
          <select formControlName="classesId">
            <option value="">请选择班级</option>
            <option *ngFor="let item of trainClassessVOS" [value]='item.classesId'>{{item.classesName}}
            </option>
          </select>
        </div>
        <div class="product-item" *ngIf="pageForm.controls.buyType.value === '2'">
          <span>次课</span>
          <select formControlName="timesCourseCode">
            <option value="">请选择次课</option>
            <option *ngFor="let item of trainTimesCourseRespVOS" [value]='item.timesCourseCode'>
              {{item.timesCourseName}}
            </option>
          </select>
        </div>
      </div>
    </form>
  </div>
  <seed-submit-button class="seed-scroll-outside" [disabled]="!pageForm.valid"
                      (submit)="submitInfo()"></seed-submit-button>
</seed-content>
